package org.jackysoft.entity;

import java.util.Comparator;

public class FileCreateTimeComparator implements Comparator<FileItem> {

	public int compare(FileItem fa, FileItem fb) {
		if(fa.getCreateTime()==null){
			if(fb.getCreateTime()==null)
				return 0;
			else
				return -1;
		}else {
			if(fb.getCreateTime()==null)
				return 1;
			else
				return -1*fa.getCreateTime().compareTo(fb.getCreateTime());
		}		
	}

}
